Repository navigation
feat(ci): fail a PR whose close keywords sit in prose (#672) - #786
Merged
Merged
Conversation
GitHub closes an issue for a close keyword anywhere in a PR body or a commit that lands on main. Eight issues here were shut by prose saying they stayed open, and #780 named #776 both as Refs and as closing the day before this. scripts/check_close_keywords.py reads the title, body, commits and closingIssuesReferences over GraphQL and fails when a keyword is not the first word of its sentence, when its sentence negates, or when an issue the merge will close is also named with Refs. The list of issues the merge will close goes to the job summary either way. It runs from its own workflow so a body edit re-runs it without re-running validate. --text lints a draft; --self-test keeps every historic phrase as a fixture. Closes #672. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Sentence-boundary false negatives, incomplete GraphQL handling, and stale sidebar-link checks can bypass or misreport enforcement.
Review effort: Balanced
Findings: 1
Open (5)
What changed in this PR
Adds a dedicated CI safeguard against accidental issue closures caused by close keywords embedded in prose.
Changes:
- Adds GraphQL-backed keyword validation with self-tests.
- Adds a PR workflow and job summary.
- Updates CI documentation, changelog, roadmap, and test discovery notes.
| File | Description |
|---|---|
scripts/check_close_keywords.py |
Implements keyword validation and fixtures. |
.github/workflows/close-keywords.yml |
Runs validation on PR events. |
scripts/self-tests.sh |
Documents the discovered suite. |
README.md |
Lists the new CI check. |
docs/roadmap.md |
Removes the completed roadmap item. |
docs/changelog.md |
Records the new check. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- A semicolon no longer ends a sentence, and a wrapped blockquote is one sentence: both let a mid-sentence keyword through. - closingIssuesReferences is read with pageInfo and fails loudly past 100, as commits already did. - Closing nodes keep their repository, so a cross-repository close is not reported as, or conflicted with, this repository's issue of that number. - The sidebar-link gap is documented in the workflow and the docstring: linking emits no pull_request event, so a re-run before merge is the answer. Refs #672. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…72-90a8ba # Conflicts: # docs/changelog.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What changed
A new PR check,
scripts/check_close_keywords.py, run from its own workflowclose-keywords.yml. It reads the PR's title, body, commits andclosingIssuesReferencesover GraphQL and fails when:Refs— in the body, or a commit closes what the body only Refs.The issues the merge will close are written to the job summary whether it passes or fails. An intended close is written
Closes #N.as a sentence of its own.--text FILE|-lints a draft body or commit message before pushing.It is a separate workflow, not a job in
ci.yml, because it must re-run onedited, and that trigger onci.ymlwould re-run and cancel validate on every wording fix (the same reasoning asdigests.yml).Docs: the README CI row, the roadmap entry removed, a changelog entry, and the suite added to
self-tests.sh's prose list.Why
Eight issues were shut by keywords inside prose, and three sat closed with the work undone until the 2026-09-26 pass. Yesterday's #780 added a ninth shape: Refs and a close of the same issue in one body. The by-hand check after opening a PR was not enough.
Blast radius
CI only. No host, VLAN or service is touched. The worst case is a false failure, fixed by rewording the body.
secrets/*.sops.yamlVerification
--self-test: 32 fixtures pass, discovered byself-tests.sh(337 fixtures across 22 suites).Read-only against the record with
--pr N: 319, 252, 382, 521, 545, 652, 664, 758 and 780 all fail, each quoting the sentence; 781 and 743 pass and list what they closed; 670 reports that it closes nothing.scripts/validate.sh: all checks passed, 4 skipped locally (deployment-checkout timers).lint.sh(actionlint, yamllint) andcheck_docs.pypass.This body and the commit message were run through
--textbefore pushing.make validatepassesDeployed to the lab and confirmed working — not applicable; it runs on this PR
Docs updated (
docs/, service README, ordocs/roadmap.md)Closes #672.
🤖 Generated with Claude Code